home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
prodpack.zip
/
DB4PPSRC.EXE
/
_ERRHELP.PRG
< prev
next >
Wrap
Text File
|
1993-05-04
|
3KB
|
102 lines
*' $Header: E:/test/sysproc/doc/_errhelp.prv 1.1 05 Apr 1993 8:42:12 Bill Ramos $
PROCEDURE _ErrHelp
PARAMETERS pc_msg, pl_help, pc_file, pc_name, pc_dbf, pl_keep
*----------------------------------------------------------------------------
* NAME
* _ErrHelp - Display an error box
*
* SYNOPSIS
* DO _ErrHelp WITH pc_msg ,pl_help, pc_file, pc_name, pc_dbf, pl_keep
*
* DESCRIPTION
* _ErrHelp will display the <pc_msg> string in a box and prompt the
* user to press any key to continue processing. _ErrHelp will display
* the message based on the length of <pc_msg>.
*
* PARAMETERS
* pc_msg = Error message to display in the box, up to two lines
* of 55 characters per line. Use semi-colon to split
* the line. If pc_msg is longer than 55 characters and
* it does not contain a semi-colon, _ErrHelp will split
* the line at the last word fits within 55 characters.
*
* pl_help = Flag that indicates that a help button is needed.
*
* pc_file = Name of form file in the case of form help, and
* the of the popup in the case of system help
*
* pc_name = Name of the field in the case of form help, and
* the number of the bar in the case of system help
*
* pc_dbf = Name of the database to be used by _HelpSys (MFFUHELP,
* Sys_Help, or an inputted name by the user)
*
* pl_keep = Keep help database open even if it wasn't open upon entry
*
* EXAMPLE
* DO _ErrHelp WITH "Incorrect window size"
* Displays the message in a window as follows:
*
* +-[o]--------------------------+
* | |
* | +--------------------------+ |
* | | Incorrect window size | |
* | | | |
* | +--------------------------+ |
* | +----------------+ |
* | | Ok Help | |
* | +----------------+ |
* | |
* +------------------------------+
*
*----------------------------------------------------------------------------
DECLARE ERRHELP[ 2 ]
*-- BT_OK - Ok
ERRHELP[ 1 ] = .T.
*-- BT_ERRHLP - ~Help
ERRHELP[ 2 ] = .F.
FXL_Cancel = .F.
FXL_NoChng = .F.
nSemiColon = AT( ";", pc_msg )
IF nSemiColon > 0
Err_Msg1 = LEFT( pc_msg, nSemiColon - 1 )
Err_Msg2 = SUBSTR( pc_msg, nSemiColon + 1 )
ELSE
IF LEN( pc_msg ) > 55
cLine1 = LEFT( pc_msg, 55 )
nLastSpace = RAT( " ", cLine1 )
IF nLastSpace = 0
Err_Msg1 = LEFT( pc_msg, 55 )
Err_Msg2 = SUBSTR( pc_msg, 56 )
ELSE
Err_Msg1 = TRIM( LEFT( cLine1, nLastSpace - 1 ) )
Err_Msg2 = SUBSTR( cLine1, nLastSpace + 1 ) + SUBSTR( pc_msg, 56 )
ENDIF
ELSE
Err_Msg1 = pc_Msg
Err_Msg2 = ""
ENDIF
ENDIF
Err_Msg1 = HelpCTit( TRIM( Err_Msg1 ), 55 )
IF .NOT. ISBLANK( Err_Msg2 )
Err_Msg2 = HelpCTit( TRIM( Err_Msg2 ), 55 )
ENDIF
*----------------------
*-- Call the Dialog box
*----------------------
DO ERRHELP
RETURN
*-- EOP: _ErrHelp
*'-------------------------------------------------------------------------
*' $Log: E:/test/sysproc/doc/_errhelp.prv $
*'-------------------------------------------------------------------------